home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19971216-19980424
/
000145_news@newsmaster….columbia.edu _Sun Feb 1 17:26:00 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA07814
for <kermit.misc@watsun.cc.columbia.edu>; Sun, 1 Feb 1998 17:25:59 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA27555
for kermit.misc@watsun; Sun, 1 Feb 1998 17:25:59 -0500 (EST)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.unix.sco.misc,comp.protocols.kermit.misc
Subject: Re: Modem Communications
Date: 1 Feb 1998 22:25:54 GMT
Organization: Columbia University
Lines: 54
Message-ID: <6b2spi$dgi$1@apakabar.cc.columbia.edu>
References: <34d4ed93.0@fiji.easyway.net>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.unix.sco.misc:60085 comp.protocols.kermit.misc:8328
In article <34d4ed93.0@fiji.easyway.net>, mcp <mcp@easyway.net> wrote:
: Is there a way to address the modem directly from the UNIX OS without having
: to load an emulation program and then typing in modem commands? I'm
: interested in being able to send a modem a list of commands directly from
: the OS... maybe via a shell script. For example, sometimes I need to reset
: a modem back to certain settings after a previous program has changed them
: and wiped out NVRAM. I would idealy like to be able to run an imaginary
: command like:
:
: "modem_reset /dev/tty1A atz at&f atS0=1 at$MB9600 at&w"
:
: and have my modem re-init based on the given settings.
:
: Any one know of a way to do something like this?
:
You can use C-Kermit 6.0. Unlike most modem software, it gives you a choice
between controlling the modem itself, or letting you do it:
http://www.columbia.edu/kermit/ck60.html
To accomplish the above, after installing C-Kermit, you could create the
following file (call it, say, modem_reset):
---(cut here)---
#!/usr/local/bin/kermit
set carrier-watch off
xif failure { echo Can't open device, exit 1 }
set speed 19200 ; or whatever
output ATQ0V1\13
input 10 OK
xif failure { echo Can't get modem's attention, exit 2 }
output atz at&f atS0=1 at$MB9600 at&w\13
input 10 OK
xif success { echo OK, exit 0 }
echo Error initializing modem
exit 3
---(cut here)---
Then:
chmod +x modem_reset
Then to use it:
modem_reset -l /dev/tty1A
The "-l" option and its argument (the device name) are passed to kermit.
So you don't even need a shell script.
Obviously, you could also restructure it to let you specify the modem
commands on the command line or whatever else you wanted.
- Frank